package testJdk.commonUse.enmu;

public enum Season2 implements Info{
    //1.创建当前枚举类的多个对象
    // 注意枚举类的规范和原来不同，能省的都尽量省掉了
    SPRING("春天", "万物复苏"){
        @Override
        public void show() {
            System.out.println("春天在哪里");
        }
    },
    SUNNER("夏天", "阳光明媚"){
        @Override
        public void show() {
            System.out.println("宁静的夏天");
        }
    },
    AUTUMN("球天", "丰收时节"){
        @Override
        public void show() {
            System.out.println("秋天不回来");
        }
    },
    WINTER("春天", "玩物蛰伏"){
        @Override
        public void show() {
            System.out.println("大约在冬季");
        }
    };

    //2.声明对象的属性
    private final String seasonName;
    private final String description;

    //3.构造方法
    private Season2(String seasonName, String description) {
        this.seasonName = seasonName;
        this.description = description;
    }

    //4.其他诉求：获取对象的属性
    public String getSeasonName() { return seasonName; }
    public String getDescription() { return description; }
}

interface Info{
    void show();
}

class Test{
    public static void main(String[] args) {
        //定制show()方法
        Season2.WINTER.show();
        Season2.AUTUMN.show();
    }
}